
import Taro from "@tarojs/taro";
interface info {
     navbarHieght:number,
     area:{[propKey:string]:any},
     statusBarHeight:number
}
export function NavbarInfo():Promise<info>{

    const area=Taro.getMenuButtonBoundingClientRect();

    return new Promise((resolve,reject)=>{
        Taro.getSystemInfo({}).then((res)=>{
             resolve({
                navbarHieght:area.bottom+(area.top-res.statusBarHeight)*2,
                area:area,
                statusBarHeight:res.statusBarHeight
            })
        })
    })

  
}